import request from '@/utils/request'

// 查询文件管理审核后列表
export function listAffile(query) {
  return request({
    url: '/system/affile/list',
    method: 'get',
    params: query
  })
}

// 查询文件管理审核后详细
export function getAffile(id) {
  return request({
    url: '/system/affile/' + id,
    method: 'get'
  })
}

// 新增文件管理审核后
export function addAffile(data) {
  return request({
    url: '/system/affile',
    method: 'post',
    data: data
  })
}

// 获取文件注释信息
export function getAffileComment() {
  return request({
    url: '/system/affile/getAffileComment',
    method: 'post'
  })
}



// 修改文件管理审核后
export function updateAffile(data) {
  return request({
    url: '/system/affile',
    method: 'put',
    data: data
  })
}

// 删除文件管理审核后
export function delAffile(id) {
  return request({
    url: '/system/affile/' + id,
    method: 'delete'
  })
}

export function getAffileInfoById(data){
  return request({
    url: '/system/file/getAffileById',
    method: 'post',
    data: data
  })
}

export function getPdf(data) {
  return request({
    url: '/system/file/getPdf',
    method: 'post',
    data: data,
    responseType:'arraybuffer'
  })
}

export function getType(data) {
  return request({
    url: '/system/file/getType',
    method: 'post',
    data: data,
  })
}
export function downloadMore(engFileId) {
  return request({
    url: '/system/file/downloadMore/' + engFileId,
    method: 'get',
    responseType:'arraybuffer'
  })
}
